package com.spring.cloud.service

import org.springframework.cloud.client.loadbalancer.LoadBalanced
import org.springframework.cloud.netflix.feign.FeignClient
import org.springframework.stereotype.Service
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod

@FeignClient("${'$'}{services.provider}")
interface HelloService {

    @LoadBalanced
    @RequestMapping(value = "/hello/{name}", method = arrayOf(RequestMethod.GET))
    fun hello(@PathVariable("name") name: String): String
}